<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        canvas {
            border: 1px solid red;
        }
    </style>
</head>
<body>
<canvas id="content" width="500" height="500">您的浏览器暂不支持canvas,请升级浏览器版本</canvas>
<script src="canvas.js"></script>
<script>
    let obj = new Canvas({
        canvasId: 'content',
    });
    obj.drawFillRect(0, 0, 100, 100, 'gray')
    obj.drawStrokeRect(100, 100, 50, 50, 'green')
</script>
</body>
</html>